package com.hhrpc.hhrpc.demo.provider;


import com.hhrpc.hhrpc.core.annotation.HhRpcProvider;
import com.hhrpc.hhrpc.core.api.RpcRequest;
import com.hhrpc.hhrpc.demo.api.User;
import com.hhrpc.hhrpc.demo.api.UserService;
import org.springframework.stereotype.Service;

@Service
@HhRpcProvider
public class UserServiceImpl implements UserService {

    @Override
    public User findById(Integer uid) {
        return new User(uid,"hh:"+System.currentTimeMillis());
    }

    @Override
    public User findById(Integer uid, String name) {
        return new User(uid,name);
    }

    @Override
    public long getLongId(long id) {
        return id;
    }

    @Override
    public User findUser(User user) {
        return user;
    }


}
